package SingleList;

public class TestLinkedList {
    public static void main(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.addFirst(11);
        myLinkedList.addFirst(12);
        myLinkedList.addFirst(13);
        myLinkedList.addLast(10);
        System.out.println("清除前的链表：");
        myLinkedList.print();
        myLinkedList.clear();
        System.out.println("清除后的链表：");
        myLinkedList.print();
    }
    public static void main3(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.addFirst(5);
        myLinkedList.addFirst(4);
        myLinkedList.addFirst(3);
        myLinkedList.addFirst(2);
        myLinkedList.addFirst(1);
        myLinkedList.print();
    }
    public static void main2(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.creatList();
        System.out.println(myLinkedList.contains(666));
        System.out.println(myLinkedList.contains(11));
        System.out.println(myLinkedList.size());

    }
    public static void main1(String[] args) {
        MyLinkedList myLinkedList=new MyLinkedList();
        myLinkedList.creatList();
        myLinkedList.print();
    }

}
